/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.vote.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "cooperative_record")
public class CooperativeRecord implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String openid;
	private Date createTime;
	
	private CooperativeEmp emp;
	
	
	/* ---------------- method ----------------*/
	
	public CooperativeRecord(){
	}

	public CooperativeRecord(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "openid")
	public String getOpenid() {
		return openid;
	}
	
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@ManyToOne
	@JoinColumn(name = "emp_id")
	public CooperativeEmp getEmp() {
		return emp;
	}
	
	public void setEmp(CooperativeEmp emp){
		this.emp = emp;
	}
	
}



